package routes

import (
	"go-mgdms/internal/common/handlers"

	"github.com/gin-gonic/gin"
	"gorm.io/gorm"
)

// RegisterCommonRoutes 注册通用路由
func RegisterCommonRoutes(r *gin.RouterGroup, db *gorm.DB) {
	// 验证码控制器
	captchaHandler := handlers.NewCaptchaHandler(db)

	// 验证码路由
	r.GET("/clickCaptcha", captchaHandler.GetClickCaptcha)
	r.POST("/checkClickCaptcha", captchaHandler.VerifyClickCaptcha) // 可选添加验证接口
}
